/**
 * Created by hdw on 2017/5/16.
 */
import React, {Component} from 'react'
import {Link} from 'react-router'
import '../sass/Nav'

export default class Nav extends Component {
  constructor() {
    super()
  }

  render() {
    const {items, jumpTo} = this.props

    return (
      <nav className="aList">
        {
            items.map((item, id) =>
              <Link className="link"
                key={id}
                onClick={item.link ? jumpTo.bind(this, item.link) : null}
              >
                <img src={item.pictureUrl} alt="active"/>
                <p>{item.remark}</p>
              </Link>
            )
        }
      </nav>
    )
  }
}
